home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / IIGS / TN.IIGS.006 < prev    next >
Encoding:
Text File  |  1989-08-21  |  2.3 KB  |  52 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Apple IIGS
  8. #6:    QuickDraw II Pattern Data Structure
  9.  
  10. Revised by:    Dave Lyons                                           July 1989
  11. Written by:    Guillermo Ortiz                                  December 1986
  12.  
  13. Some QuickDraw II calls require a pen pattern as input or return one as 
  14. output; regardless of the drawing mode (320 mode or 640 mode), a pen pattern 
  15. takes 32 bytes.
  16. Changed since November 1988:  Starting with System Software 5.0, all 32 
  17. bytes are significant if bit 15 of the current port's arcRot field is set.  
  18. Changed wording to cover QuickDraw II patterns in general, instead of pen 
  19. patterns only.
  20. _____________________________________________________________________________
  21.  
  22. Early QuickDraw II documentation described the pattern data structure as 
  23. follows:
  24.  
  25. TYPE 
  26.     nibble  = 0..15;
  27.     twobit   = 0..3;
  28.     Pattern = RECORD CASE MODE OF
  29.             mode320:(PACKED ARRAY [0..63] OF nibble);    { 32 bytes }
  30.             mode640:(PACKED ARRAY [0..63] OF twobit);    { 16 bytes }
  31.         END;
  32.  
  33. This declaration could lead one to believe that 16 bytes are enough when 
  34. making calls to QuickDraw II in 640 mode.  This is not true.  A pattern 
  35. always takes 32 bytes; QuickDraw II calls that copy or construct patterns 
  36. access all 32 bytes.  That means it is never safe to pass the address of a
  37. 16-byte area as a pattern.  Toolbox calls that return data into your buffer 
  38. overwrite 16 bytes immediately following your buffer.  Calls that copy data 
  39. from your buffer access those extra 16 bytes, possibly including soft switches 
  40. or reserved space in the memory map.
  41.  
  42. The difference between modes is that QuickDraw II normally ignores the second 
  43. 16 bytes if the current port's locInfo indicates 640 mode.  Starting with 
  44. System Software 5.0, all 32 bytes of patterns are significant in 640 mode when 
  45. bit 15 of the current port's arcRot field has been set with SetArcRot.  In 
  46. this case, patterns are 16 pixels wide and 8 pixels high.
  47.  
  48.  
  49. Further Reference
  50. _____________________________________________________________________________
  51.     o    Apple IIGS Toolbox Reference, Volume 2
  52.     o    System Software 5.0 documentation (APDA)